<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style: none;
        }
        .banner{
            position: relative;
            margin: 100px auto;
            width: 600px;
            height: 220px;
            border: 2px solid #ccc;
            overflow: hidden;
        }
        .banner .img{
            float: left;
            width: 20%;
            height: 100%;
            background-size: cover;
        }
    </style>
</head>
<body>
    <div class="banner">
        <div class="img" style="background-image: url(image/m1.jpg)"></div>
        <div class="img" style="background-image: url(image/m2.jpg)"></div>
        <div class="img" style="background-image: url(image/m3.jpg)"></div>
        <div class="img" style="background-image: url(image/m4.jpg)"></div>
        <div class="img" style="background-image: url(image/m5.jpg)"></div>
    </div>

    <script src="jquery.min.js"></script>
    <script>
        $('.img').mouseenter(function () {
            $(event.target).stop().animate({width: '40%'}, 300, 'swing').siblings().stop().animate({width: '15%'}, 300, 'swing')
        }).mouseleave(function () {
            $('.img').stop().animate({
                        width: '20%'
                    }, 300, 'swing')
        })
    </script>
</body>
</html>